<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<!-- intoHead Start -->
		{include file="common/intohead" /}
		<!-- /intoHead End -->
	</head>

	<body class="mainbody">
		<!--导航栏-->
		{include file="common/position" /}
		<div class="line10"></div>
		<div class="builder formbuilder-box ">
			<div id="floatHead" class="content-tab-wrap" style="height: 42px;">
				<div class="content-tab">
					<div class="content-tab-ul-wrap">
						<ul>
						{volist name="group_tab_nav" id="li" key="group_k"}
				            <li><a href="javascript:;" {eq name="group_k" value="1"} class="selected"{/eq}>{$key}</a></li>
				        {/volist}
				        {empty name="group_tab_nav"}
				        	<li><a href="javascript:;" class="selected">{present name="meta_title"}{$meta_title}{/present}</a></li>
				        {/empty}
						</ul>
					</div>
				</div>
			</div>

			<form action="{$post_url}" method="POST" data-url="" enctype="multipart/form-data" id="formData" onsubmit="return false">
				<fieldset>
					{empty name="group_tab_nav"}
						<div class="tab-content" >
							{volist name="fieldList" id="field" key="k"} 
								{switch name="field.type"} 
									{include file="../application/admin/view/builder/from-fields.html"/}
									{default/} 
								{/switch} 
							{/volist}
						</div>
					{else/}
						{volist name="group_tab_nav" id="vGroup" key="i"}
							<div class="tab-content" style="{if condition='$i neq 1'}display: none;{/if}">
							{volist name="fieldList" id="field" key="k"} 
								{php}if(in_array($field['name'],$vGroup)||(is_array($field['name'])&&in_array(implode('|', $field['name']),$vGroup))){{/php}
	                                {switch name="field.type"} 
										{include file="../application/admin/view/builder/from-fields.html"/}
										{default/} 
									{/switch} 
                                {php}}{/php}
								
							{/volist}
						</div>
						{/volist}
					{/empty}
					<!--数据提交-->
					<div class="page-footer">
						<div class="btn-wrap" style="position: fixed;">
							<input type="submit" value="提交保存" id="btnSubmit" class="btn ajaxSubmit">
							<input type="button" value="返回上一页" class="btn yellow" onclick="javascript:history.back(-1);">
						</div>
					</div>
					<!--/数据提交-->
				</fieldset>
			</form>
		</div>
		{// 额外功能代码 } 
		{$extra_html}
		{load href="__LIBS__/kindeditor/kindeditor.js,__LIBS__/kindeditor/lang/zh_CN.js" }
		<script type="text/javascript">
			//kingeditor编辑器
			var editor;
			KindEditor.ready(function(K) {
				editor = K.create('textarea[name="contents"]', {
					allowFileManager: true,

					//下面这句处理ajax提交数据
					uploadJson: '__LIBS__/kindeditor/php/upload_json.php?url=scoreshop',
                    urlType:'domain',
					afterBlur: function() {
						this.sync();
					}
				});
			});
		</script>
	 
		<script>
			// layui.use('laydate', function(){
			//   	var laydate = layui.laydate;
			  
			//   	var start = {
			//     	min: laydate.now()
			//     	,max: '2099-06-16 23:59:59'
			//     	,istoday: false
			//     	,choose: function(datas){
			//       		end.min = datas; //开始日选好后，重置结束日的最小日期
			//       		end.start = datas //将结束日的初始值设定为开始日
			//     	}
			//   	};
			  
			//   	var end = {
			//     	min: laydate.now()
			//     	,max: '2099-06-16 23:59:59'
			//     	,istoday: false
			//     	,choose: function(datas){
			//       		start.max = datas; //结束日选好后，重置开始日的最大日期
			//     	}
			//   	};
			  
			// });
			</script>
			{present name="webuploader"}
				{if condition="$webuploader"}
					{load href="__LIBS__/webuploader/webuploader.css" /}
					{load href="__LIBS__/webuploader/webuploader.min.js" /}

					<!-- {load href="__ADMINCSS__/file.css" /}
					{load href="__ADMINJS__/cropbox.js" /} -->
				{/if}
			{/present}
	</body>
</html>